﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Schuifpuzzel.Model;

namespace Schuifpuzzel
{
    /// <summary>
    /// Interaction logic for PictureScreen.xaml
    /// </summary>
    public partial class PictureScreen : UserControl
    {
        /// <summary>
        /// Show the picture for the selected score, or message if no picture found.
        /// </summary>
        /// <param name="score">Score to show picture for.</param>
        public PictureScreen(Score score)
        {
            InitializeComponent();
            if (score.Image != null)
            {
                playerImage.Source = score.Image;
                playerImage.Visibility = Visibility.Visible;
            }
            else
            {
                noImage.Text = "No picture for this player.";
                playerImage.Source = null;
                playerImage.Visibility = Visibility.Hidden;
            }
        }
        
    }
}
